using Microsoft.EntityFrameworkCore;
using System;
using Xunit;
using yiwei.Repository;
using yiwei.Repository.Entity;

namespace yiwei.UnitTest
{
    public class UnitTest1
    {
        [Fact]
        public void Test1()
        {
            var optionsBuilder = new DbContextOptionsBuilder<YiWeiDBContext>();
            optionsBuilder.UseSqlServer("Data Source=.;Initial Catalog=OpenAuthPro;User=sa;Password=000000");
            using (var context = new YiWeiDBContext(optionsBuilder.Options))
            {
                // do stuff
                User T = new User();
                T.CreateId = Guid.Empty;
                T.Name = "11";
                T.Password = "11";
                T.Account = "11";
                context.Users.Add(T);
                context.SaveChanges();

            }
        }
    }
}
